package cn.edu.gxnu.dsa.sort;

public class IntType implements Comparable<IntType> {

	private int key;

	public IntType() {

	}

	public IntType(int key) {
		super();
		this.setKey(key);
	}

	@Override
	public int compareTo(IntType arg0) {
		int compareInt = arg0.getKey();
		int initialInt = this.getKey();
		return (initialInt < compareInt ? -1 : (initialInt == compareInt ? 0 : 1));
	}

	@Override
	public String toString() {
		return key + "";
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

}
